﻿@model List<PostGroup>

@foreach (PostGroup pGroup in Model)
{
    <h4>
        @pGroup.Name
    </h4>
    <ol class="list-unstyled">
        @foreach (Post pst in pGroup.PostInGroups.Select(x => x.Post))
        {
            string url = Url.Action("Details", "Post", new
            {
                postNameId = pst.NameId,
                groupNameId = pGroup.NameId
            });

            <li id="menuPostRight-@pst.NameId"><a href="@url">@pst.Name</a></li>
        }
    </ol>
    <hr />
}